<?php
include_once("{$_SERVER['DOCUMENT_ROOT']}/header.php");
$user_info = $r->return_result_by_object("tb_users", "where user_num ='$user_num'", "user_nick,reg_date,user_point,user_level,samang_win,samang_lose,samang_draw");
$next_level = $user_info->user_level + 1;
$level_info = $r->return_result_by_object("tb_user_level", "where user_level ='$next_level'", "need_point");


$remine_point = ($user_info->user_point / $level_info->need_point * 100);
$remine_point_end = 100 - $remine_point;
?>



<div style="text-align: left; font-size: 12px;">
    <div class="f_20 center">회원정보</div> 


    <table>
        <tr>
            <td colspan="2">
                <table class="w_250" >
                    <tr>
                        <td class="center bg_silver">닉네임</td><td><?= $user_info->user_nick ?></td>
                    </tr>
                    <tr>
                        <td class="center bg_silver">레벨</td><td><?= $user_info->user_level ?></td>
                    </tr>
                    <tr>
                        <td class="center bg_silver">사망유희</td><td><?= "승 : " . $user_info->samang_win . " 패 : " . $user_info->samang_lose . " 비김 : " . $user_info->samang_draw; ?></td>
                    </tr>
                    <tr>
                        <td class="center bg_silver">가입일</td><td><?= $user_info->reg_date ?></td>
                    </tr>
                    <tr>
                        <td class="center bg_silver">보너스 포인트</td><td>준비중</td>
                    </tr>
                    <tr>
                        <td class="center bg_silver">초인 포인트</td><td>준비중</td>
                    </tr>
                    <tr>
                        <td class="center bg_silver">수컷 포인트</td><td><?= $user_info->user_point . " / " . $level_info->need_point ?></td>
                    </tr>

                </table>
            </td>
        </tr>
        <tr>
            <td colspan="100" >
                <table class="w_250 " style="border:1px solid black; ">
                    <tr>
                        <td  class="h_20" width="<?= $remine_point; ?>%" style="border:1px solid blue; background-color: blue;"><div style="position:absolute; color:red; margin-top: -10px;margin-left: 100px; font-size: 20px; "><?= $remine_point; ?>%</div></td>
                        <td width="<?= $remine_point_end; ?>%"></td>


                    </tr>
                </table>

            </td>
        </tr>
    </table>



</div>